# -*- coding: utf-8 -*-
# Created by 'Zhou Bingbing'  on 2019/8/23
import operator


def sort(classCount):
    #classCount 是一个字典
    sortedClassCount = sorted(classCount.items(), key = operator.itemgetter(1), reverse = True)[:30]
    return sortedClassCount

def sort_words(classCount):
    #classCount 是一个字典
    res=[]
    sortedClassCount = sorted(classCount.items(), key = operator.itemgetter(1), reverse = True)[:10]
    return sortedClassCount